Skip to content

feat: user profile panel with hover popover and click-to-expand#456

Merged
wesbillman merged 6 commits intomainfrom
desktop-profile-panel
May 2, 2026
Merged

feat: user profile panel with hover popover and click-to-expand#456
wesbillman merged 6 commits intomainfrom
desktop-profile-panel

Conversation

@wesbillman
Copy link
Copy Markdown
Collaborator

Summary

  • Adds a user profile panel that opens in the right sidebar when clicking a user's avatar or name
  • Hover shows a compact popover with avatar, name, presence, and status; click expands to a full resizable panel with pubkey, bot info, about section, and action buttons
  • Profile panel integrates with existing thread/agent panel mutual exclusion — opening one closes the others
  • Avatar fills the panel width (matching mobile), Message button uses primary styling
  • Handles forum channels, Radix popover toggle races, and deep-link state cleanup

Changed files (12 files, +719 -158)

  • UserProfilePanel.tsx — new full profile panel component
  • UserProfilePopover.tsx — hover popover with click-to-panel behavior
  • ProfilePanelContext.tsx — context provider for panel state
  • useChannelProfilePanel.ts — hook for panel open/close/resize logic
  • ChannelScreen.tsx — wires profile panel state and mutual exclusion
  • ChannelPane.tsx — renders profile panel in sidebar slot
  • MessageRow.tsx — wraps avatar/name in popover trigger
  • ForumPostCard.tsx — popover in forum post avatars
  • ForumThreadPanel.tsx — popover in forum thread avatars
  • useChannelAgentSessions.ts — clears profile state on deep-link nav
  • mentions.spec.ts — e2e test for hover-to-popover and click-to-panel
  • check-file-sizes.mjs — allowlist for new component

Test plan

  • pnpm typecheck passes
  • pnpm check (biome + file sizes) passes
  • pnpm build succeeds
  • All lefthook pre-push hooks pass (9/9)
  • e2e test covers hover popover and click-to-panel flow
  • Manual: verify hover popover appears on avatar hover in stream channels
  • Manual: verify click opens full profile panel in sidebar
  • Manual: verify forum channel avatar click toggles popover (no panel)
  • Manual: verify profile panel closes when opening thread or agent session
  • Manual: verify Message button opens DM with the user

🤖 Generated with Claude Code

wesbillman and others added 6 commits May 2, 2026 10:24
Adds a side panel for viewing user profiles, triggered by clicking on
avatars or author names in message rows and forum post cards. The
existing popover now opens on hover with a 300ms delay and closes the
popover on click, opening the full profile panel instead.

- UserProfilePanel: new side panel component following existing panel
  patterns (resize, overlay, escape-to-close)
- UserProfilePopover: hover-triggered with delay timers, click opens
  the profile panel via ProfilePanelContext
- ProfilePanelContext: lightweight context to avoid deep prop threading
- ChannelScreen/ChannelPane: profile panel state management, DM opening
  callback via useChannelProfilePanel hook
- ForumPostCard: avatar and author name now wrapped with popover
- Copy-to-clipboard uses sonner toast matching codebase convention

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix E2E test to hover→popover, click→panel (BLOCK 1)
- Hide Message button when viewing own profile (BLOCK 2)
- Add mutual exclusion between thread, agent session, and profile panels (CHANGE 1)
- Consolidate double UserProfilePopover wrappers in ForumPostCard and
  MessageRow thread-reply layout to prevent hover flicker (CHANGE 2)
- Add UserProfilePopover to ForumThreadPanel post and reply authors (CHANGE 4)
- Normalize agent pubkey comparison with toLowerCase() (NIT 1)
- Fix tabIndex={-1} → tabIndex={0} on popover trigger (NIT 2)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- In forum contexts where ProfilePanelProvider is absent, click falls
  through to Radix's default popover toggle instead of no-op (CHANGE 1)
- Call event.preventDefault() on click when opening panel to prevent
  Radix PopoverTrigger from briefly flashing the popover (CHANGE 2)
- Clear profilePanelPubkey in the deep-link targetMessageId effect so
  navigating to a threaded message dismisses the profile panel (CHANGE 3)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Bump avatar from h-20/w-20 (80px) to h-28/w-28 (112px) for both
  img and initials fallback; scale fallback text from text-xl to text-3xl
- Replace custom Message button with shadcn Button (primary variant)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Match the mobile approach — avatar uses aspect-square w-full instead of
fixed h-28 w-28, filling the content area with a 1:1 aspect ratio.
Fallback initials text scaled to text-5xl proportionally.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The "clicking author name" test expected a Radix popover, but click
behavior was changed to open the full profile panel. Updated the test
to assert on user-profile-panel visibility instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@wesbillman wesbillman merged commit f946e9b into main May 2, 2026
13 checks passed
@wesbillman wesbillman deleted the desktop-profile-panel branch May 2, 2026 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant